#/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time    : 2022/1/15 16:44
# @Author  : wf
# @Email   : wf@163.com
# @File    : page_login.py
# @Software: PyCharm
import unittest

from selenium.webdriver.common.by import By
from time import sleep
from pages.page_base import PageBase
from case.base_case import BaseCase
class TestLogin(BaseCase):
    """登录页面"""
    #定位器
    locator_qq=([(480,1200)])
    locator_login=([(300,1150)])
    locator_login_button=(By.XPATH,'//android.widget.Button[@resource-id=\"com.tencent.mobileqq:id/fds\"]')


    def ele_qq_click(self):
        """点击qq登录"""
        self.driver.tap(self.locator_qq)
    def ele_login_click(self):
        """点击登录按钮"""
        self.driver.tap(self.locator_login)
    def login(self):
        """登录功能"""
        PageBase(self.driver).my_click()
        sleep(1)
        PageBase(self.driver).more_click()
        sleep(1)
        PageBase(self.driver).my_click()
        sleep(1)
        self.ele_qq_click()
        sleep(15)
        self.ele_login_click()
        sleep(1)
